<div class="list">
<table class="layui-table" lay-size="sm">
<thead>
<tr name="attr_{$rs.id}_thead">
	<!-- loop from=$glist key=$key value=$value id=$tmpid -->
	<th>
		<div>{$value.title}</div>
		<ul class="layout">
			<li>
				<select id="attr_{$value.id}_opt" lay-ignore style="width:90%" onchange="$.admin_list_edit.attr_option_quickadd('{$value.id}',this.value)">
					<option value="">{lang请选择…}</option>
					<!-- loop from=$value.optlist key=$k value=$v id=$idx -->
					<option value="{$v.id}">{$v.title}</option>
					<!-- /loop -->
				</select>
			</li>
			<li>
				<div class="layui-btn-group">
					<input type="button" value="{lang添加}" onclick="$.admin_list_edit.attr_option_add('{$value.id}')" class="layui-btn layui-btn-xs" />
					<input type="button" value="{lang删除}" onclick="$.admin_list_edit.attr_remove('{$value.id}')" class="layui-btn layui-btn-xs layui-btn-danger" />
				</div>
			</li>
		</ul>
	</th>
	<!-- /loop -->
	<th class="center">{lang进货价}</th>
	<th class="center">{lang市场价}</th>
	<th class="center">{lang销售价}<span style="color:red">*</span></th>
	<th class="center">{lang库存}</th>
	<th class="center" style="width:40px">{lang删除}</th>
</tr>
</thead>
<tbody>
	<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
	<tr>
		<!-- loop from=$glist key=$k value=$v id=$idx -->
		<td>{$value.info[$k]}</td>
		<!-- /loop -->
		<td><input type="text" name="_cost_price[{$value.attr}]" value="{$value.cost ? $value.cost : '0'}" class="layui-input" /></td>
		<td><input type="text" name="_market_price[{$value.attr}]" value="{$value.market ? $value.market : '0'}" class="layui-input" /></td>
		<td><input type="text" name="_sell_price[{$value.attr}]" value="{$value.price ? $value.price : '0'}" class="layui-input" /></td>
		<td><input type="text" name="_stock[{$value.attr}]" value="{$value.qty ? $value.qty : '0'}" class="layui-input" /></td>
		<td><input type="button" value="删除" onclick="$.admin_list_edit.attr_delete(this)" class="layui-btn layui-btn-xs layui-btn-primary" /></td>
		<input type="hidden" name="_attrlist[]" value="{$value.attr}" />
	</tr>
	<!-- /loop -->
</tbody>

</table>
</div>